/*访问后台的代码*/
layui.define([], function(exports) {
    var api={
            updateOrgLecture:function(form,callback){
                Lib.submitForm("/orgLecture/orgLecture/update.json",form,{},callback)
            },
            saveForm:function(isNew,form,callback){

                var mainImg = $("#mainImgView").attr("src");
                if(mainImg==null||mainImg==""){
                    layer.tips('请上传图片', '#mainImg');
                    return;
                }
                // var lectureImgs = $("#lectureImgs").val();
                // if(lectureImgs==null||lectureImgs==""){
                //     layer.tips('请上传图片', '#test2');
                //     return;
                // }
                var postUrl = "/orgLecture/orgLecture/update.json";
                if (isNew) {
                    postUrl = "/orgLecture/orgLecture/add.json";
                }
                Lib.submitFileForm(postUrl,form,{},callback)
            },
            del:function(ids,callback){
                Common.post("/orgLecture/orgLecture/delete.json",{"ids":ids},function(){
                    callback();
                })
            }
    };
    exports('orgLectureApi',api);
});